package com.clerkq.CircleList.view
{
	import com.clerkq.CircleList.data.ThumbVVO;
	import com.content.model.LoadedAssets.SkinProxy;
	import com.content.view.Component.Button.TextButton2Obj;
	import com.content.view.Component.Button.TextButtonICO;
	import com.library.core.IDisposable;
	import com.library.utils.Filter;
	import com.library.utils.Geometry;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Loader;
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.geom.Matrix;
	import flash.net.URLRequest;
	import flash.text.TextField;
	
	public class ThumbV extends TextButton2Obj
	{
		public static const SELECT:String = "ThumbV-Select";
		
		private var _index:int;
		private var _vo:ThumbVVO;
		private var _isActive:Boolean;
		
		public function ThumbV(thumbVO:ThumbVVO)
		{
			super(thumbVO.Text, 0x666666, 0xffffff,
				new SkinProxy.IMG_MPOLResCate_Item() as Sprite,
				new SkinProxy.IMG_MPOLResCate_ItemActive() as Sprite);
			
			_vo = thumbVO;
			_index = thumbVO.Index;			
			
			CenterPivot();
		}
		
		override protected function OnOut(evt:MouseEvent):void{
			
			if(_isActive) return;
			_text.textColor = _colText;
			_obj.visible = true;
			_objActive.visible = false;
		}
		
		
		public function get isActive():Boolean			{     return (_isActive);        }
        public function set isActive(value:Boolean):void{
			_isActive = value;
            if (_isActive){
                super.OnOver(null);
                mouseEnabled = false;
            } else {
                super.OnOut(null);
                mouseEnabled = true;
            };
        }
        
		public function get index():int						{		return _index;			}
		public function get vo():ThumbVVO					{		return _vo;			}
		override public function Dispose():void{
			super.Dispose();
		}
		
	}
}